package com.job.blossom.work0707.example0707;

/**
 * @author ZJM
 * @version 1.0
 * @since 2022-07-08 18:27:36
 *
 * 数据类型，模板图纸，代码载体
 * 权限（访问）修饰符 用来 修饰：类，方法，成员变量，构造方法
 * 最大：public 被修饰的，可以在任何位置访问
 * 最小：private >>>>>>,只能在本类中访问
 * 默认不写：。。。。。。只能在本类中访问和本包中访问
 *
 * 包：文件夹，同一包内不能出现同名类，  区分同名类，使用包名.类名  全路径类名
 *
 */
public class Worker {
    public String name = "蒋老师";
    int age = 20;
    private double weight;

    public void show1(){
        System.out.println("show1");
    }
    void show2(){
        System.out.println("show2");
    }
    private void show3(){
        System.out.println("show3");
    }

    public Worker() {
    }

    private Worker(String name) {
        this.name = name;
    }

    Worker(String name, int age, double weight) {
        this.name = name;
        this.age = age;
        this.weight = weight;
    }

    public Worker(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Worker(String name, double weight) {
        this.name = name;
        this.weight = weight;
    }

    public Worker(int age, double weight) {
        this.age = age;
        this.weight = weight;
    }

    public static void main(String[] args) {
        Worker worker = new Worker("lll",60.0);
        worker.show3();
    }
}
